<?php

define('PID_FILE', "/tmp/master.pid");
define('OUT_FILE','/tmp/signal_out');




include 'Myworker.php';
function workerfun(Myworker $obj ){
    while(true){
        echo posix_getpid().'--'.get_class($obj).PHP_EOL;
        sleep(3);
    }
}

$worker = new  Myworker(PID_FILE, 3,'workerfun',OUT_FILE);
$worker->run();


